#define _CRT_SECURE_NO_WARNINGS 1

#include"RBTree.h"
#include <iostream>
#include <set>
#include <map>

using std::cout;
using std::endl;

void test1()
{
	std::set<int> st;
	for (int i = 1; i <= 10; i++)
	{
		st.insert(i);
	}
	for (auto e : st) cout << e << " "; cout << endl;

	st.erase(2);
	auto it = st.begin();
	st.erase(1);
	for (auto e : st) cout << e << " "; cout << endl;

	for (auto it = st.begin(); it != st.end(); it++)
	{
		//cout << *it << " ";
		//it = st.find(5);
		st.erase(5);
	}

	for (auto it = st.begin(); it != st.end();)
	{
		if (*it == 3)
			it=st.erase(it);
			//st.erase(it++);
		else
			it++;
	}

	it = st.find(7);
	st.erase(it, st.end());
	for (auto e : st) cout << e << " "; cout << endl;
}

class Date {
public:
	Date(){}

	Date(int y,int m,int d)
		:_year(y),_month(m),_day(d)
	{}

	void print()
	{
		cout << _year << ":" << _month << ":" << _day << endl;
	}

private:
	int _year = 1999;
	int _month = 1;
	int _day = 1;
};


Date* operator&(Date& d)
{
	return &d;
}


int main()
{
	//test1();
	
	Date d1(2024, 8, 12);
	d1.print();

	cout << &d1 << endl;

	return 0;
}